﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Diagnostics;
using System.IO;

namespace MoneyManagerNET.Infrastructure
{
    public class SeperateFileTraceListener:TextWriterTraceListener
    {
        static string GenerateFileName(string fileName){
            var ext=Path.GetExtension(fileName);
            var noext=Path.GetFileNameWithoutExtension(fileName);
            var result=noext+"_"+DateTime.Now.ToString(@"(HH MM ss  fff)")+ext;

            return result;
        }


        public SeperateFileTraceListener(string fileName):base(GenerateFileName(fileName))
        {
            

        }
    }
}
